package com.lifeng.config;

import feign.Contract;
import feign.auth.BasicAuthRequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by lifeng on 2018/4/26.
 */
@Configuration
public class UserServiceFeignConfig {
    /** 可以自定义协议*/
    @Bean
    public Contract feignContract() {
        return new feign.Contract.Default();
    }

    /**访问eureka需要用户名和密码*/
    /*@Bean
    public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
        return new BasicAuthRequestInterceptor("zs", "123");
    }*/
}
